/****************************************************************
 * bmp085.h														*
 * Hardware: BMP085												*
 * Created: 08.01.2014 14:35:50									*
 * Author: Peter Gantner										*
 ***************************************************************/ 


#ifndef BMP085_H_
#define BMP085_H_

#define F_CPU 12000000UL

#include <avr/io.h>
#include <util/delay.h>
#include "i2c_master.h"
#include <stdio.h>
#include <string.h>

// Adressen von I2C-Bausteinen
#define DevEAT123A	 0x74 // LCD EAT123A,	(0 1 1 1 0  1 SA0 R/W)
#define BMP085_WRITE 0xEE
#define BMP085_READ  0xEF
#define OSS			 0
#define TOUTH        0x02
#define BOTH         0x12

extern void bmp085_Calibration(void);
extern short bmp085_ReadCal(unsigned char address);
extern long  bmp085_ReadTemp(void);
extern long  bmp085_ReadPres(void);
extern void  bmp085_Convert(long * temperature, long * pressure);
extern int display_outstring(char *outtext);
extern void bmp085_get_altitude(void);

char temp_string[12];
char press_string[12];
char alt_string[12];
unsigned int result;
float wert;
short ac1;
short ac2;
short ac3;
unsigned short ac4;
unsigned short ac5;
unsigned short ac6;
short b1;
short b2;
short mb;
short mc;
short md;

char outstring_ac1[12], outstring_ac2[12], outstring_ac3[12], outstring_ac4[12],
outstring_ac4[12], outstring_ac5[12], outstring_ac6[12], outstring_b1[12],
outstring_b2[12], outstring_mb[12], outstring_mc[12], outstring_md[12];

long temperature;
long pressure;
long altitude;
double temp;


#endif /* BMP085_H_ */